var OSS = require('ali-oss')

/**
 * 1. Bucket权限为公共读
 * 2. 需要设置跨域: Bucket列表->详情->数据安全->跨域设置->创建规则
 *    来源: *
 *    允许Method: 勾选GET POST PUT
 *    允许Headers: *
 *    暴露Headers: ETag
 * 3. accessKeyId和accessKeySecret在阿里云头像弹窗AccessKey管理设置
 */
export function oss () {
  return new OSS({
    accessKeyId: 'test',
    accessKeySecret: 'test',
    bucket: 'test',
    secure: true, // 使用https
    region: 'oss-cn-shenzhen',
    endpoint: 'oss-cn-shenzhen.aliyuncs.com'
  })
}
